package com.west_traveler.tiyutoutiao.application;

import android.app.Application;

import com.west_traveler.tiyutoutiao.interfacess.HttpService;

import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Description:
 * created at 2016/12/17 16:15
 *
 * @author: 黄昌友
 */

public class BaseApplication extends Application {

    private HttpService service;

    public HttpService getService() {
        return service;
    }

    @Override
    public void onCreate() {
        service = new Retrofit.Builder()
                .baseUrl("http://api.lifxapi.com/")
                .addConverterFactory(GsonConverterFactory.create())
                .build()
                .create(HttpService.class);
    }
}
